package com.xjy.headfirst.命令模式;

/**
 * decription:
 *
 * @author 辛纪元
 * @since 2022-07-07
 */

public class SimpleRemoteControl {

    Command slot;

    public SimpleRemoteControl() {
    }

    public void setCommand(Command command) {
        this.slot = command;
    }

    public void buttonWasPressed() {
        slot.execute();
    }


}
